<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="style/default.css">

<title>Default patient list</title>
</head>
<body>
	<div id="wrapper">
		<jsp:include page="menu.jsp"></jsp:include>
		<div id="content-block">
			<div id="content-wrapper">
				<h1>${title}</h1>
				<div class="horizontal-line"></div>
				<c:choose>
					<c:when test="${empty search.error}">
						<table class="list-table">
							<tr>
								<c:forEach items="${listColumn}" var="column">
									<th>${column}</th>
								</c:forEach>
							</tr>

							<c:forEach items="${listPatient}" var="patient">
								<tr>
									<td><a
										href="
									<c:url value="patient">
										<c:param name="id" value="${patient.id}"/>
									</c:url>
										">

											<c:out value="${patient.firstName} ${patient.lastName}"/></a></td>
								</tr>
							</c:forEach>
						</table>
					</c:when>
					<c:otherwise>
						<p class="error">${search.error}</p>
					</c:otherwise>
				</c:choose>
			</div>
		</div>
	</div>
</body>
</html>